<%@ page import="ecom.beans.AccountRemote"%>
<%@ page import="ecom.shell.ShellRemote"%>
<%@ page import="javax.transaction.*"%>
<%@ page import="javax.naming.Context"%>
<%@ page import="javax.naming.InitialContext"%>
<%@ page import="javax.naming.NamingException"%>

<%@ page import="java.io.*"%>
<%@ page import="javax.xml.transform.*"%>
<%@ page import="javax.xml.transform.stream.*"%>

<%
        ShellRemote shell = (ShellRemote) session.getAttribute("shell");

        AccountRemote user = (AccountRemote) session.getAttribute("user");
        
        if (shell != null) {
            TransformerFactory tFactory = TransformerFactory.newInstance();
            Transformer transformer = tFactory.newTransformer(new StreamSource("C://JAVA//wkspace//ecom//ecom-war//web//XSL/user_menu.xsl"));
            StringWriter res = new StringWriter();
            transformer.transform(
                    new StreamSource(new StringReader(shell.executeCommand("account -id " + user.getAccountId()))),
                    new StreamResult(res));
            out.println(res);
        }
%>